class PathOperator:
    def __init__(self, path=''):
        self.path = Path(path)

    def __str__(self):
        return str(self.path)

    def __truediv__(self, other):
        return PathOperator(str(self.path / other))

    def mkdirs(self):
        if not self.path.exists():
            self.path.mkdir(parents=True)

    def get_absolute_path(self):
        return str(self.path.resolve())


# 使用示例
path1 = PathOperator('/usr/local/Cellar/')
path2 = path1 / 'python/3.7.7_1/bin/python3'
print(path2)  # 打印: /usr/local/Cellar/python/3.7.7_1/bin/python3

new_path = PathOperator('/usr/local/Cellar/python/3.7.7_1/bin/python3/hello.py')
new_path.mkdirs()

print(new_path.get_absolute_path())  